package com.taihe.template.base.util;

/**
 * Created by hantuo on 16/4/29.
 */
public class SimpleCaculator {

    public final static int max(int... ints) {
        int max = ints[0];
        for (int i = 1; i < ints.length; i++) {
            max = max < ints[i] ? ints[i] : max;
        }
        return max;
    }

    public static int min(int... ints) {
        int max = ints[0];
        for (int i = 1; i < ints.length; i++) {
            max = max > ints[i] ? ints[i] : max;
        }
        return max;
    }
}
